package edu.hunau.cxb18.mapper;

import edu.hunau.cxb18.pojo.Order;
import edu.hunau.cxb18.pojo.User;
import edu.hunau.cxb18.pojo.UserQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author gwl
 * @create 2020-02-25 下午 8:45
 */
public interface UserMapper{

    public void insertUser(User user);

    public void deleteByUserName(User user);

    public void deleteById(Integer id);

    public void insertUsers(List<User> users);

    public void updatePwd(@Param("id") Integer id,@Param("pwd") String newpwd);


       public void updateUserById(User user);

       public User queryById(Integer id);

       public User queryByUsernameAndPwd(@Param("username") String username,@Param("pwd") String pwd);


       public User queryByMap(Map map);

       public User queryByUserQuery(UserQuery query);



       /*
       *根据用户编号级联查询订单信息
       * */
       public  User queryByIdCascadeOrders(int id);




}
